Label orientation

ABSTRACT

A computing device can identify, for a placement of a label, a first and second character of the label that have a shortest distance from one another. The placement for the label can define a position at which the label is to be placed in an interactive geographic map and a formatting for that label. The computing device can determine that the first and second identified characters do not overlap. In response to determining that the first and second characters do not overlap, the computing device can select the placement of the label for display in the interactive geographic map.

BACKGROUND

Interactive geographic maps, e.g., maps provided by a web map service,can provide a visual representation of a geographic region. Aninteractive geographic map for a particular geographic region can alsodescribe various features that appear in the particular geographicregion. For example, an interactive geographic map can describe linefeatures, e.g., roads and rivers, area features, e.g., countries,parcels, forests, and lakes, and point features, e.g., villages andcities. Each feature in an interactive geographic map can be labeled,e.g., annotated, by positioning, near the feature and in the interactivegeographic map, one or more labels, e.g., map labels, that describe thefeature. For example, an interactive geographic map that includes apoint feature referencing the city of San Francisco can be labeled byplacing a label “San Francisco” near the point feature.

Computerized methods can be used to automatically position respectivelabels near features in an interactive geographic map. Such computerizedmethods can be configured to label features in an interactive geographicmap based on predefined rules, e.g., repeat labels for roads or placelabels for point features in a position that is located northwestdirection of the point features. These computerized methods can alsoapply various algorithms, e.g., simulated annealing, genetic algorithms,etc., to optimize the placement of labels for features in an interactivegeographic map. For example, various algorithms can be applied toposition labels in an interactive geographic map in a manner that avoidsoverlap with other labels.

Computerized labeling of curved line features, e.g., curved road labels,can create special challenges. For example, positioning a label for acurved line feature is generally done by positioning the characters inthe label along a boundary of the curved line feature. In suchinstances, characters positioned incorrectly can overlap and, as aresult, make the label difficult to read in a geographic map. It isdifficult to predetermine character overlap for a curved line featurelabel since most interactive mapping applications allow for maps to beviewed at different zoom levels. That is, characters may need to berepositioned as a user zooms in and out of an interactive geographic mapand can therefore make it difficult to predetermine whether charactersin a label will overlap.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments in accordance with the present disclosure will bedescribed with reference to the drawings, in which:

FIG. 1 illustrates an example frame for an interactive geographic mapthat illustrates curved line features;

FIG. 2 illustrates an example method for determining an overlap betweencharacters in a label;

FIGS. 3-4 illustrate another example method for determining an overlapbetween characters in a label;

FIG. 5 illustrates an example method for determining a curvature for alabel placement;

FIG. 6 is a flow diagram of an example process for filtering a labelbased on an overlap between characters in a label;

FIGS. 7A-B illustrate example frames in an interactive geographic mapthat illustrate different orientations for a placement of a label;

FIG. 8 is a flow diagram of an example process for determining when tochange an orientation for a placement of a label;

FIG. 9 illustrates an example method for determining label placementsfor a line feature;

FIG. 10 is a flow diagram of an example process for selecting labelplacements for a line feature;

FIG. 11 illustrates an example of an environment for implementingaspects in accordance with various embodiments; and

FIG. 12 illustrates example components of a client device.

DETAILED DESCRIPTION

Systems and methods in accordance with various embodiments of thepresent disclosure overcome one or more of the above-referenced andother deficiencies in conventional approaches to placing labels in aninteractive geographic map. In particular, various embodiments of thepresent disclosure can provide a method for determining an overlapbetween characters in a label placement in an interactive geographicmap.

In various embodiments, before selecting labels for display in aninteractive geographic map, the labels can be evaluated to determinewhether characters in a label overlap with one another. As a result, alabel placement that has overlapping characters and, thus, can bedifficult for a user to read, is not selected for display in aninteractive geographic map. Instead, upon making this determination, asystem can select a different placement for that label.

Various methods can be used to determine whether characters in aplacement of a label overlap. In some embodiments, an overlap existswhen respective bounding boxes for characters in a label collide. Insome instances, using bounding boxes to determine overlap does not takeinto account an orientation of the characters. Thus, in someembodiments, an overlap is determined by determining a distance betweentwo characters, e.g., as determined using respective center coordinatesfor the two characters, and comparing that distance to a sum ofrespective radii for the two characters. As described below, a radiusfor a character can be determined using a width and a height of thecharacter. In some embodiments, overlap detection between characters ina label placement can be performed both on a map server and on a clientdevice that receives map data from the map server, as described below.

Other advantages, variations, and functions are described and suggestedbelow as may be provided in accordance with the various embodiments.

FIG. 1 illustrates an example frame 102 for an interactive geographicmap that illustrates curved line features, e.g., 104 and 110. The frame102 is displayed on a display screen of a computing device 100, e.g.,the device 1102, as described in reference to FIG. 11. The frame 102 wasrendered using, for example, map data that was received from a mapsearch system 1105, as described in reference to FIG. 11. In otherwords, the frame 102 is the portion of the interactive geographic mapthat is visible on the display screen of the computing device 100 at anygiven point.

In FIG. 1, the feature 104 is a curved road. There may be a number ofcandidate placements for a label that describes the feature 104. Forexample, a label for the feature 104 may be placed in one of severaldifferent positions that conform to a curvature of the road. Further,the label can be formatted differently, e.g., curved, depending on theposition in which it is placed. For example, characters in a label canbe formatted to fit a particular curve or arch. This placement of alabel can affect how that label will appear in an interactive geographicmap. For example, in FIG. 1, the interactive geographic map displays alabel 106, e.g., “Shore Dr,” for the feature 104 that is positioned inone possible placement. The label 106 is shown as being curved along aboundary of the feature 104. Similarly, another label 108 for thefeature 104 is placed along another boundary of the feature 104.

When automatically placing labels, computerized methods may need toquickly determine, for each feature, which of the different possibleplacements of a label for that feature are the best placements. One ofthe considerations for placing a label for a line feature, e.g., a roador a river, is determining whether that placement would result in anoverlap between characters that are in the label. For example, in someinstances, the placement of a label along a curved segment of a road 110can result in an overlap between one or more characters in the label, asillustrated by the label 112, e.g., “1st St”. Such overlapping cansometimes render a label unreadable in a geographic map. Thus, in someembodiments, before placing a label in an interactive geographic map,one or more techniques, as described below, are used to determine anoverlap between characters in the label. In such embodiments, a labelplacement that would result in overlapping characters is no longerconsidered as a candidate placement.

FIG. 2 illustrates an example method for determining an overlap 220between characters 206, 208, 210, 212, 214, 216, and 218 in a label 204.In some embodiments, the method is performed by a map search system,e.g., the system 1105, as described in reference to FIG. 11. In FIG. 2,the label 204 is shown as being placed along a road 203 in a frame 202of an interactive geographic map.

Each frame of an interactive geographic map can describe a particulargeographic region using, for example, a collection of map tiles.Further, each map tile in the collection describes a portion of theparticular geographic region at some zoom level. In general, the zoomlevel defines a level of magnification at which a geographic map isdisplayed in a map viewport, for example. A user can interact with themap viewport to adjust the level of magnification within some specifiedrange, e.g., between a zoom level of 1 to 20, inclusive. A zoom level of1, e.g., a minimum zoom level, can display a frame of an interactivegeographic map that is generated using a first collection of map tilesthat describe a fully zoomed out map. In contrast, a zoom level of 20,e.g., a maximum zoom level, can display a frame an interactivegeographic map that is generated using a second collection of map tilesthat describe a higher resolution of the map.

As a zoom level is adjusted, e.g., increased or decreased, differentlabels may be selected for placement in the interactive geographic map.For example, an interactive geographic map at a minimum zoom level maydescribe a map of the United States that includes a label for “UnitedStates” and some other labels for each of the states. However, as thezoom level is increased, the interactive geographic map can be updatedto display a more detailed geographic region, e.g., the state of Kansas,and can place labels that describe that particular geographic region,e.g., cities within the state of Kansas. Additionally, as the zoom levelis adjusted, different placements may be determined for labels that werealready displayed in the interactive geographic map. For example, alabel “Seine River” may be placed along a particular boundary of afeature in an interactive geographic map and formatted, e.g., curved, tobe displayed along the particular boundary of a feature. When the zoomlevel is increased, a new placement for the label “Seine River” can bedetermined that changes the position at which the label is placed in theinteractive geographic map and also changes the formatting, e.g.,curving, of the label to be displayed along a different boundary of thefeature. The example above describes adjusting the orientation of aninteractive geographic map by adjusting the zoom level. Changing thezoom level is one example of how a user can change an orientation of theinteractive geographic map. However, the orientation of the interactivegeographic map can be manipulated in other ways including, for example,rotating or tilting the map. As described above, different labels may beselected for placement in the interactive geographic map in response tosuch manipulation of the interactive geographic map.

In some embodiments, an overlap between characters in a label isdetermined by evaluating a placement of the label in an interactivegeographic map at a particular zoom level. A label may appear in a frameof an interactive geographic map at different zoom levels. For example,a label for the city of San Francisco may appear in map tiles thatcorrespond to zoom levels 3 to 8, inclusive. In some embodiments, anoverlap between characters in a label is determined by evaluating theplacement of the label at a minimum zoom level at which the label wouldappear in an interactive geographic map. For example, if a label “SanFrancisco” appears in an interactive geographic map at zoom levels 3 to8, inclusive, then an overlap between the characters in the label “SanFrancisco” can be determined by evaluating the placement of thecharacters in the label “San Francisco” at zoom level 3, which, in thisexample, is the minimum zoom level at which the label would appear inthe interactive geographic map.

In some embodiments, a respective bounding box can be drawn around eachof the characters 206, 208, 210, 212, 214, 216, and 218 to determine anoverlap between two characters, as illustrated in FIG. 2. An overlapbetween two bounding boxes can be determined using generally knowncollision detection techniques or using an Application ProgrammingInterface (API), e.g., the JTS Topology Suite. The size of each boundingbox for a character can be rectangular in shape and can have dimensionsthat are based on the size of the character. That is, the dimensions ofa bounding box for a character can be determined based on a respectiveheight and width of the character at a minimum zoom level at which thecharacter would appear in an interactive geographic map. In someembodiments, the size of the bounding box is reduced by a percentage,e.g., 10, 25, or 50 percent. An overlap between two characters existswhen there is an overlap between respective bounding boxes for those twocharacters. As illustrated in FIG. 2, an overlap 220 exists between therespective bounding boxes for the characters 206 and 208. Once anoverlap is determined, a different placement for the label can beselected and evaluated using the techniques described in thisspecification. Various automatic placement techniques can be used todetermine a different placement for a label including, for example,rule-based algorithms, greedy algorithms, simulated annealing,evolutionary algorithms, or a combination thereof.

In some embodiments, an overlap between characters in a label can be anyoverlap between two or more characters in that label, between two ormore respective bounding boxes for characters in that label, or betweentwo or more respective radii for characters in that label, as describedin FIG. 3.

FIG. 3 illustrates another example method for determining an overlap 320between characters, e.g., the characters 306 and 308 in a label 304. Insome embodiments, the method is performed by a map search system, e.g.,the system 1105, as described in reference to FIG. 11. In FIG. 3, thelabel 304 is shown as being placed along a road 303 in a frame 302 of aninteractive geographic map.

As described in reference to FIG. 2, each frame of an interactivegeographic map can describe a particular geographic region using, forexample, a collection of map tiles. Further, each map tile in thecollection describes a portion of the particular geographic region atsome zoom level. In some embodiments, an overlap between characters in alabel is determined by evaluating the placement of the label at aminimum zoom level at which the label would appear in an interactivegeographic map, as described above in reference to FIG. 2.

For purposes of discussion, FIG. 3 illustrates how an overlap isdetected between two characters, e.g., the characters 306 and 308, inthe label 304. However, in general, this method can be applied to eachcharacter of a label. That is, respective overlaps can be determinedbased on a pairwise comparison between each character of the label andevery other character of the label.

In some embodiments, to determine an overlap between the character 306and 308, a respective radius is determined for each of the characters306 and 308. A radius for a character can be determined based on a widthand a height of the character as that character appears in aninteractive geographic map. That is, the size of the character and thefont in which it will be displayed can be evaluated to determine thecharacter's height and width. The radius for the character can bedetermined from the height and width using, for example, the PythagoreanTheorem. An example formula for determining the radius is reproducedbelow:r ²=(0.5*h)²+(0.5*w)²

where r is the radius, h is the height of the character, and where w isthe width of the character.

In some embodiments, the size of radius is reduced by a percentage,e.g., 10, 25, 50, or 70 percent.

A distance between respective center coordinates for each of thecharacters 306 and 308 is also determined. For example, a centercoordinate for a character can be determined based on the width andheight of the character and describes a geometric center of thecharacter in two-dimensional space. The center coordinate for thecharacter can be predetermined by a system, e.g., the map search system1105, and can be described using x and y pixel coordinates. For example,a display screen can be treated as a two-dimensional coordinate systemwith an x-axis and a y-axis. Positions within this coordinate system canbe identified using a point along the x-axis, i.e., x pixel coordinate,and a point along the y-axis, i.e., y pixel coordinate. Once the centercoordinates for the characters 306 and 308 have been determined, thedistance between the center coordinates can be determined using thedistance formula. An example formula for determining the distancebetween two center coordinates is reproduced below:d=√{square root over ((x ₂ −x ₁)²+(y ₂ −y ₁)²)}

where d is the distance, x₁ and y₁ are the x and y coordinates for thefirst center point, and where x₂ and y₂ are the x and y coordinates forthe second center point.

To determine an overlap between the characters 306 and 308, therespective radii of the characters 306 and 308 are added together andcompared with the distance between the respective center coordinates forthe characters 306 and 308. If the sum of the respective radii of thecharacters 306 and 308 is less than the distance, then there is nooverlap between the characters 306 and 308. If the sum of the respectiveradii of the characters 306 and 308 is greater than the distance, thenthere is overlap between the characters 306 and 308. If the sum of therespective radii of the characters 306 and 308 equals the distance, thenthe characters 306 and 308 are touching. Depending on theimplementation, a threshold percentage of overlap is permitted betweenthe respective radii of the characters 306 and 308. As illustrated inFIG. 3, an overlap 320 exists between the respective radii of thecharacters 306 and 308. Once an overlap is determined, a differentplacement for the label can be selected and evaluated using thetechniques described in this specification.

FIG. 4 shows respective radii 422 and 424 for the characters 306 and 308that were placed along the road 303, as described in reference to FIG.3. A distance 426 between the respective center coordinates for thecharacters 306 and 308 is also shown. The respective radii 422 and 424,along with the distance 426 can be used, can be used to determine anoverlap between the characters 306 and 308, as described above.

A label placement that satisfies the techniques described in FIGS. 2-4can be provided to a client device, e.g., the client device 1102, asdescribed in reference to FIG. 11. The client device can render aninteractive geographic map using the label placement, as describedbelow.

Given the nature of interactive geographic maps, there may be instancesin which further evaluation is needed for label placements that wereselected by a map search system, e.g., the system 1105. For example, themap search system may have selected particular label placements becausesuch placements did not have overlapping characters at a particular zoomlevel. However, the same label placements that were selected by the mapsearch system may have overlapping characters at a different zoom level.Thus, in some embodiments, when a user adjusts the zoom level for aninteractive geographic map, the label placements are reevaluated, e.g.,by the client device displaying the interactive geographic map, todetermine whether characters in the label placements overlap.

The client device can determine whether characters in a label placementoverlap using, for example, the technique described in FIGS. 3-4 above.However, determining an overlap between characters for every labelplacement in an interactive geographic map using a client device cancause performance issues. Thus, in some embodiments, before determiningwhether characters in a label placement overlap, the client deviceremoves from consideration, e.g., filters, characters in the labelplacement that exceed a minimum overlap threshold distance. That is, theclient device can iterate over each character of a label placement alongthe x-axis and determine whether a distance between a position of acharacter along the x-axis and a position of the character's successorcharacter along the x-axis exceeds the minimum overlap thresholddistance. A position of a character along the x-axis can be determinedusing the x-value of the character's center coordinates. If the distanceexceeds the minimum overlap threshold distance, then that successorcharacter is removed from further consideration in determining anoverlap between the successor character and some other character of thelabel placement.

For example, assuming a minimum overlap threshold distance of 10 units,if the a position of a first character along the x-axis is at position50 and a position of a second successor character along the x-axis is atposition 62, then the distance of the second successor character fromthe first character is 12 units. Since 12 units exceeds the thresholddistance of 10 units, the second successor character can be removed fromfurther consideration in determining an overlap between the secondsuccessor character and some other character of the label placement.

Similarly, the client device can iterate over each character of a labelplacement along the y-axis and determine whether a distance between aposition of a character along the y-axis and a position of thecharacter's successor character along the y-axis exceeds the minimumoverlap threshold distance. A position of a character along the y-axiscan be determined using the y-value of the character's centercoordinates. If the distance exceeds the minimum overlap thresholddistance, then that successor character is removed from furtherconsideration in determining an overlap between the successor characterand some other character of the label placement. In some embodiments,the minimum overlap threshold distance for a label placement is twicethe width of the largest character of the label placement, for example,as determined based on the font, size, height, and width of thecharacters in the label placement.

Once the filtering is complete, the client device can apply a recursivedivide-and-conquer approach on the remaining characters in the labelplacement to identify the two characters in the label placement thathave the shortest distance from one another. After identifying the twoclosest characters, the client device can determine whether an overlapexists between the two closest characters using, for example, thetechniques described above. For example, to determine an overlap betweenthe two closest characters, the client device can compare a sum of therespective radii of the two closest characters with the distance betweenthe respective center coordinates for the two closest characters, asdescribed above.

If an overlap between the two closest characters exists, the clientdevice no longer displays uses that label placement and replaces it witha different label placement for that frame of the interactive geographicmap. Depending on the embodiment, this process is repeated for labelplacements in response to further user interaction, e.g., zooming in orout, with the interactive geographic map.

FIG. 5 illustrates an example method for determining a curvature of alabel placement 504. In some embodiments, the curvature of a labelplacement can be used to determine whether that particular labelplacement is further evaluated using the techniques described in FIGS.2-4. In order words, when determining label placements, respectivecurvatures of the label placements can be determined to filterplacements that do not satisfy a threshold curvature. Label placementsthat satisfy a threshold curvature, for example, label placements thatare generally straight, can be further evaluated using the techniquesdescribed in FIGS. 2-4. A label placement that does not satisfy athreshold curvature will not be selected for display since such labelplacements may result in overlapping characters and, therefore, areundesirable.

In some embodiments, a curvature of a label placement is determined by aratio of a numerator that represents a distance between a firstcharacter of the label and a last character of the label and adenominator that is the length of the label. For example, in FIG. 5, alabel 504 “Shore Dr,” is placed along a road 503 in an interactivegeographic map. A distance 514 between the first character 510, e.g.,“S”, and the last character 512, e.g., “r”, in the label 504 can bedetermined by determining a distance between the center coordinates forthe first character 510 and the center coordinates for the lastcharacter 512. The distance formula, as described above, can be used todetermine the distance between the first and last characters in thelabel. The length of the label 504 can be determined by measuring awidth of each character of the label 504 based on a font and font sizewith which the character will be rendered in an interactive geographicmap. A ratio that is equal to one means that the label placement has nocurvature and is considered a straight label. A ratio that is closer tozero means that the label placement is curved. In some embodiments,label placements that do not satisfy a threshold curvature are no longerconsidered for placement in an interactive geographic map. In suchembodiments, label placements that satisfy the threshold curvature arefurther evaluated using the techniques described in FIGS. 2-5.

FIG. 6 illustrates a flow diagram of an example process 600 forselecting a label based on an overlap of characters in the label. Theexample process 600 is provided merely as an example and additional orfewer steps may be performed in similar or alternative orders, or inparallel, within the scope of the various embodiments described in thisspecification. A computing device identifies, for a placement of alabel, a first and second character of the label that have a shortestdistance from one another 602. The placement for the label defines aposition at which the label is to be placed in an interactive geographicmap and a formatting, e.g., curvature for that label.

The computing device determines that the first and second characters inthe label do not overlap 604. For example, the computing device candetermine that the first and second characters do not overlap bydetermining that respective bounding boxes for the first and secondcharacters do not collide. In another example, the computing device candetermine that the first and second characters do not overlap bydetermining that a sum of respective radii of the first and secondcharacters is less than a distance between respective center coordinatesfor the first and second characters. The center coordinates can identifya position of a character in an interactive geographic map. In responseto determining that the first and second characters in the label do notoverlap, the computing device selects the placement of the label fordisplay in the interactive geographic map 606.

FIG. 7A illustrates an example frame 702 for an interactive geographicmap that illustrates line features, e.g., 704 and 706. The frame 702 isdisplayed on a display screen of a computing device 700, e.g., thedevice 1102, as described in reference to FIG. 11. The frame 702 wasrendered using, for example, map data that was received from a mapsearch system 1105, as described in reference to FIG. 11.

The frame 702 is similar to the frame 102 that was described inreference to FIG. 1. In some embodiments, an interactive geographic mapcan be rotated in response to a change in the orientation of a computingdevice. Thus, in FIG. 7, the frame 702 has been rotated in response to achange in the orientation of the computing device 700. Consequently, asthe interactive geographic map rotates, labels that identify linefeatures, e.g., rivers, roads, borders between territories, in theinteractive geographic map are also rotated to orient the labels in adirection along their respective line features, as those line featuresrotate about in the interactive geographic map. For example, a label canbe positioned at a particular location in an interactive geographic map.When the computing device 700 rotates, the label can rotate around theparticular location in which it was positioned.

In such situations, as the interactive geographic map is rotated, it ispossible for placements for labels in the interactive geographic map tobecome inverted, e.g., upside down. This can make the interactivegeographic map more difficult for a user to read.

Thus, in some embodiments, angles for placements of labels are trackedand aligned with respect to an orientation, e.g., display screen, of thecomputing device 700 that is displaying the interactive geographic map.When an angle for a label that is displayed at a first orientation,e.g., right way up, crosses, e.g., satisfies, a threshold referencepoint, the label is flipped to be displayed at a second orientation,e.g., upside down. In other words, the second orientation for the labelcan be an orientation that is rotated 180 degrees, or within a thresholdrange from 180 degrees, from the first orientation. In some embodiments,the threshold reference point is defined based on a reference point,e.g., 0 or π radians, that is offset by a constant, e.g., 0.1 radians,as described below.

However, such rotating or changing the orientation of the computingdevice 700, can result in a label flipping between a first orientation,e.g., the label 708 as described in reference to FIG. 7A, and secondorientation, e.g., the label 710 as described in reference to FIG. 7B.Such flipping of a label can be distracting to a user that is viewingthe interactive geographic map.

Thus, to control such flipping, in some embodiments, when an angle for alabel that is positioned at a first orientation crosses a thresholdreference point, the label is flipped to its second orientation. Forexample, in response to a rotation of the computing device 700, thelabel can rotate in a counter-clockwise direction at a certain angletoward a threshold reference point that is defined by a reference pointof 180 degrees plus a constant of 5 degrees, e.g., 185 degrees. Once theangle rotates across the threshold reference point, the thresholdreference point is adjusted by the same constant in the opposite, e.g.,clockwise, direction. For example, in response to a rotation of thecomputing device 700, the label can rotate in a clockwise direction at acertain angle toward the adjusted threshold reference point that isdefined by the reference point of 180 degrees minus the constant of 5degrees, e.g., 175 degrees.

Thus, the label stays at its second orientation until, in response to arotation of the computing 700, the angle for the label crosses theadjusted threshold reference point. Such adjusting of the thresholdreference point between frames of the interactive geographic map canprevent the flipping of a label between its first and secondorientations.

Since one of the goals of placing labels in the interactive geographicmap is to increase readability, placements of labels can be orientedwith respect to the display screen of the computing device 700 based onwhat direction is determined to be vertically up, e.g., physically up.The orientation of the computing device 700 may be determined using oneor more accelerometers that are in the computing device 700. Thisorientation indicates a direction in which the computing device 700 isfacing. In some embodiments, the orientation of the computing device 700is determined using one or more head tracking techniques. In suchembodiments, the placements of labels can be oriented with respect to adirection of the eyes or head of a user operating the computing device700.

In some embodiments, an angle for a label is initially determined inworld space. World space represents a geographic map of the world inthree-dimensional space. Particular features, e.g., roads, can beidentified in world space using their corresponding world coordinates.The angle of the label in world space can be represented using pixelcoordinates to determine an angle for the label in two-dimensionalspace. When determining the angle for the label in world space,respective vectors are determined beginning from the first character inthe label to each other character in the label. For example, for thelabel “Z St,” a first vector is determined beginning from the firstcharacter “Z” to the character “S” and a second vector is determinedbeginning from the first character “Z” to the character “t”. Thesevectors can be determined using equal weighting or width weighting,depending on the implementation. The angles of the respective vectorsbeginning from the first character in the label to each of the othercharacters in the label are averaged to determine the angle for aplacement for the label. In some embodiments, a vector generallydescribes a geometric quantity that has a magnitude, e.g., length, and adirection that is expressed numerically, for example, as an ordered listof tuples, e.g., [x, y, z], that describe the vector along axiscomponents.

The angle for the placement for the label typically needs to beconverted from world space to a screen coordinate system, e.g., pixelcoordinates, so that the angle is calibrated to the display screen ofthe computing device 700. By way of example, FIG. 7A shows an angle 716that was determined for the label 708 that is positioned in an updirection. In contrast, FIG. 7B shows an angle 718 that was determinedfor the label 710 that is positioned in a down direction.

In some embodiments, an angle for a label in an interactive geographicmap is determined in world space by a map server system, e.g., by thesystem 1105, as described in reference to FIG. 11, and provided with mapdata for a geographic region, as also described in reference to FIG. 11.In such embodiments, a computing device, e.g., the device 700, convertsthe angle from world space to screen coordinates, e.g., pixelcoordinates, with respect to an orientation of the computing device.

Upon conversion to screen coordinates, the angle for the label can beevaluated with respect to an orientation of the computing device 700.For example, an angle for a label can range from 0 to 2π radians. Insome embodiments, 0 and π radians are considered threshold referencepoints at which a label will flip between a first orientation and asecond orientation. In some embodiments, the threshold reference pointfor a label is defined by a reference point, e.g., π radians, that isadjusted, e.g., offset, by some constant, e.g., 0.1 radians, in responseto the label flipping from a first orientation to a second orientation.

For example, for a label to flip from a first orientation to a secondorientation, a threshold reference point can be defined by a referencepoint π radians plus a constant, e.g., 0.1 radians. Once the angle forthe label flips to the second orientation, the threshold reference pointis adjusted to π radians minus the constant, e.g., 0.1 radians. Thus,the angle for the label must rotate in the opposite direction and crossthe adjusted threshold reference point to flip back to the firstorientation.

FIG. 8 is a flow diagram of an example process 800 for changing theorientation for a label. The example process 800 is provided merely asan example and additional or fewer steps may be performed in similar oralternative orders, or in parallel, within the scope of the variousembodiments described in this specification. A computing devicedetermines a change in an orientation of the computing device 802.

In response to determining the change in the orientation of thecomputing device, the computing device rotates a first label in aninteractive geographic map displayed on a display screen of thecomputing device, 804. The first label can be oriented at a firstorientation in the interactive geographic map. The computing devicedetermines that an angle for the rotated first label satisfies athreshold reference point 806. In response to determining that the anglefor the rotated first label satisfies a threshold reference point, thecomputing device orientates the first label at a second orientation 808.

FIG. 9 illustrates an example method for determining label placements904, 906, 908, and 910 for a line feature 903. In some embodiments, themethod is performed by a map search system, e.g., the system 1105, asdescribed in reference to FIG. 11. In FIG. 9, the label placements 904,906, 908, and 910 are shown as being placed along a road, i.e., a linefeature, 903 in a map tile 902 of an interactive geographic map. Theroad 903 is made up of segments 912, 914, 916, and 918. Each segment canbe divided into sub-segments. For example, segment 912 is shown ashaving been divided into a first sub-segment 920 and a secondsub-segment 922.

When generating map tiles to send to a client device, for example, inresponse to a map search query, a system, e.g., the map search system1105, determines where to place labels for line features, e.g., roads,that appear in the map tiles. Typically, data describing the linefeature, e.g., the road 903, is made up of a series of segments, e.g.,segments 912, 914, 916, and 918. When generating a map tile thatincludes that line feature 903, the segments 912, 914, 916, and 918, forthe line feature 903 in that map tile 902 are joined together usinggenerally known techniques. The system then determines placementpositions for a label for the line feature 903 in the map tile 902 basedon the length of the label, e.g., the label “Shore Dr,” and on thegeometry, e.g., curvature, of the line feature 903. The systemdetermines a number of different possible placements for that label,e.g., placements 904, 906, 908, and 910, and then determines which ofthe possible placements are the best placements for that label, asdescribed below.

Generally, when determining the number of different possible placementsfor a label for the line feature 903, the system iterates over segments,e.g., the segment 912, for the line feature and identifies sub-segments,e.g., the sub-segments 920 and 922, that are long enough to include thelabel. The number of sub-segments identified can vary based on thelength of the label. For example, a label “1st St.” requires a fewernumber of sub-segments than a label “Martin Luther King Jr. Dr.” In someembodiments, to identify sub-segments for a label placement, the systemdetermines a length of a label for a line feature at the zoom level atwhich the map tile is being generated.

The system then identifies the first segment 912 of the line feature 903as a sub-segment. During this identification, the beginning of the firstsegment 912 is identified as the start point 924 and the end of thefirst segment 912 is identified as the end point 926.

If the sub-segment, as defined by the start point 924 and the end point926, is smaller than the length of the label “Shore Dr,” then the systemincrements the end point 926 to include the next segment 914 of the linefeature 903. This incrementing continues in a similar manner until thesub-segment, as defined by the start point 924 and the end point 926, islong enough to include the length of the label “Shore Dr.” Thus, in thisexample, if the label for the line feature 903 was “Martin Luther KingJr. Dr” and the sub-segment was defined by the start point 924 and theend point 926, then the system could adjust the sub-segment byincrementing the end point 926 to include the next segment 914, so thatthe length of the new sub-segment is long enough to include the label“Martin Luther King Jr. Dr.”

However, if the sub-segment, as defined by the start point 924 and theend point 926, is larger than the length of the label “Shore Dr,” asshown in the example of FIG. 9, then the system adjusts the start point924 of the sub-segment along the line segment 903 until the sub-segmentcan no longer be reduced without becoming smaller than the length of thelabel “Shore Dr.” Once a sub-segment that fits the label “Shore Dr” hasbeen identified, the system generates a score for the sub-segment.

The sub-segment score is used to identify the best placements for alabel along the line feature 903. In some embodiments, the sub-segmentscore is based on a curvature of a label placement within thesub-segment and the distance of the sub-segment from the center of theline feature 903.

The curvature of the label placement can be determined using the methoddescribed above in reference to FIG. 5. In some embodiments, thedistance of the sub-segment from the center of the line feature 903 isdetermined by subtracting a center point of the sub-segment from thecenter point of the line feature 903. To generate the sub-segment score,a first value can be determined by dividing the distance of thesub-segment from the center of the line feature 903 by a fraction, e.g.,one-third, one-fourth, or one-half, of the total length of the linefeature 903. The first value can be adjusted, e.g., multiplied, by aweight. Next, the curvature of the label placement can also be adjusted,e.g., multiplied, by a different weight. The adjusted first value andthe adjusted curvature of the label placement can be added together togenerate the sub-segment score. Other ways of adjusting the sub-segmentscore are possible. For example, label placements that are close to roadintersections can be weighted lower than those that are further away.Label placements that are more horizontal can be weighted higher thanthose that are more vertical. Label placements that are closer to majorroads can be weighted higher than those that are not.

Additional sub-segments can be identified along the line feature 903, asdescribed above. For example, after identifying the sub-segment above,the system can traverse along the line feature 903 to the next linesegment to determine the next sub-segment that can fit another placementof the label “Shore Dr,” and determine that sub-segment's respectivescore. In instances where no sub-segments in the line feature 903 thatcan fit the label “Shore Dr,” but the line feature 903 itself is longenough to fit the label “Shore Dr,” the system identifies the linefeature 903 as the sub-segment in which the label “Shore Dr” can beplaced.

The best sub-segments for placement of the label “Shore Dr,” along withtheir respective scores, can be identified after determining all of thepotential sub-segments for the line feature 903. In some embodiments,when determining the best sub-segments from the potential sub-segmentsfor the line feature 903, the system can first select, from the list ofpotential sub-segments, the sub-segment having the lowest score and addthat sub-segment to a list of kept sub-segments.

The system can select, from the list of potential sub-segments, thesub-segment having the next lowest score and can evaluate the selectedsub-segment with sub-segments in the list of kept sub-segments. Whenevaluating the selected sub-segment, the system can determine whetherthe selected sub-segment overlaps with other sub-segments in the list ofkept sub-segments. If an overlap exists, the selected sub-segment isdiscarded and no longer considered as a potential sub-segment. If nooverlap exists, the selected sub-segment is added to the list of keptsub-segments. This process continues for each sub-segment in the list ofpotential sub-segments.

Once the list of kept sub-segments has been generated, the systemevaluates each sub-segment in the list of kept sub-segments by placingthe label “Shore Dr” on the sub-segment. If the length of thesub-segment is greater than or equal to twice the length of the label“Shore Dr,” the system splits the sub-segment into as many possiblesmaller sub-segments that can fit within the sub-segment and can eachfit the label “Shore Dr.” If the length of the sub-segment is notgreater than or equal to twice the length of the label, then nosplitting of the sub-segment is performed.

Additional operations then performed on each sub-segment in the list ofkept sub-segments, including the sub-segments that resulted fromsplitting a sub-segment, as described above, to ensure that thesub-segment will be legible. Generally, a label is illegible if the linefeature is so curvy that characters of the label will be drawn on top ofeach other. To identify the best sub-segments, on each sub-segment inthe list of kept sub-segments, including the sub-segments that resultedfrom splitting a sub-segment, is evaluated to determine if placing thelabel “Shore Dr” in that sub-segment would result in characters of thelabel overlapping. Character overlap can be determined using the methodsdescribed above in reference to FIGS. 2-4.

If no character overlap for the sub-segment is determined, then thesub-segment is used for placing the label “Shore Dr” along the linefeature 903. The position and respective score for the sub-segment isstored and can be provided to a client device when providing datadescribing a map tile in which the line feature 903 appears. The scorecan be used by the client device, for example, to place labels whengenerating an interactive geographic map. For example, when selecting asingle label, the client device can pick the best label, based on therespective scores of the label placements, that is not obscured by otherlabels and is closest to the center of the screen.

In some embodiments, the process described above can be performed bydividing the line feature into fixed sub-segments, and by placing labelsat a fixed spacing in those sub-segments. Label placements that areillegible, as determined using the methods above, are discarded and donot appear in the line feature.

FIG. 10 is a flow diagram of an example process for selecting labelplacements for a line feature. The example process 1000 is providedmerely as an example and additional or fewer steps may be performed insimilar or alternative orders, or in parallel, within the scope of thevarious embodiments described in this specification. A computing devicesegments a line feature to identify one or more potential placements forat least one label that describes the line feature 1002. The computingdevice generates respective scores for the one or more identifiedpotential placements 1004. The computing device identifies, from the oneor more identified placements and based on the respective scores, atleast one placement that satisfies one or more criteria 1006. Thecomputing device selects the at least one placement for use in placingthe at least one label that describes the line feature 1008.

FIG. 11 illustrates an example of an environment 1100 for implementingaspects in accordance with various embodiments. Although a web-basedenvironment is described for purposes of explanation, differentenvironments may be used, as appropriate, to implement variousembodiments.

The example environment 1100 includes a map search system 1105 and adata plane 1110. The map search system 1105 includes at least one webserver 1106 and at least one map server 1108, as described below. Themap search system 1105 is an example of an interactive geographic mapretrieval system implemented as computer programs on one or morecomputers in one or more locations, in which the systems, components,and techniques described below can be implemented.

A user can interact with the map search system 1105 through a clientdevice 1102. For example, the client device 1102 can be a computercoupled to the map search system 1105 through a data communicationnetwork 1104, e.g., the Internet. In some instances, the map searchsystem 1105 can be implemented on the client device 1102, for example,through a software application executing on the client device 1102. Theclient device 1102 generally includes a memory, e.g., a random accessmemory (RAM), for storing instructions and data, and a processor forexecuting stored instructions. The client device 1102 can be anyappropriate device operable to send and receive requests, messages, orother types of information over the network 1104. The client device 1102can also include a display screen though which a user interacting withthe client device can view information, e.g., interactive geographicmaps. Some examples of client devices include personal computers,cellular phones, handheld messaging devices, laptop computers, set-topboxes, personal data assistants, electronic book readers, tabletdevices, and the like.

The network 1104 can include any appropriate network, including anintranet, the Internet, a cellular network, a local area network, a widearea network, or any other such network, or combination thereof.Components used for such a system can depend at least in part upon thetype of network, the environment selected, or both. Protocols andcomponents for communicating over such a network are well known and willnot be discussed herein in detail. The client device 1102 cancommunicate over the network using wired or wireless connections, andcombinations thereof.

A user can use the client device 1102 to submit a map search query 1120to the map search system 1105. The map search query 1120 can request aninteractive geographic map for a particular geographic region that isidentified by a geographic address, e.g., a street address, city, state,zip code, geographic coordinates, or a name of a point of interest. Whenthe user submits the map search query 1120, the query 1120 may betransmitted through the network 1104 to a map server 1108 within the mapsearch system 1105. The map server 1108 responds to the query 1120 byusing, for example, the geographic map data 1112, to identify map data1122 describing a geographic region that satisfies the query 1120. Themap server 1108 sends the map data 1122 through the network 1104 to theclient device 1102 for presentation to the user.

The map data 1122 can include data describing a map of the particulargeographic region. The map data 1122 can be used, for example, by aclient device 1102, to generate an interactive geographic map thatprovides a visual, e.g., two-dimensional or three-dimensional,representation of the particular geographic region.

The map data 1122 can describe the map of the particular geographicregion using, for example, a collection of map tiles at a specified zoomlevel. For example, in response to a map search query for the city ofSan Francisco, the map server 1108 can identify a collection of maptiles that collectively describe a map of the city of San Francisco at aspecified zoom level. Each map tile in the collection visually describesa portion of the map of San Francisco at the specified zoom level.Different types of maps of a geographic region may be provided dependingon the user's selection including, for example, road maps, satellitemaps, a hybrid maps, e.g., a combination of normal and satellite views,or physical maps based on terrain information.

Further, the map data 1122 can also include a collection of labels,e.g., text labels, icons, or both, for the requested geographic region.Each label can describe a feature that is located in the requestedgeographic region. Some examples of features include line features,e.g., roads and rivers, area features, e.g., countries, parcels,forests, and lakes, and point features, e.g., cities and points ofinterest. The map data 1122 can also include, for each label, respectivecoordinates that specify a location at which the label is to bepositioned in an interactive geographic map. Coordinates for labels canbe specified by a user, e.g., a cartographer, or may be generated by themap server 1108. For example, a label “San Francisco” can be assignedcoordinates so that the label is positioned in a centrally located maptile in a collection of map tiles for the city of San Francisco.

In some embodiments, the map server 1108 generates respective popularityscores for labels that correspond to a particular geographic region. Alabel's popularity score generally indicates the popularity of the labelfor a particular geographic region. Label popularity scores can be used,for example, to prioritize the selection of labels to be displayed in aninteractive geographic map. Generally, the higher the popularity score,the more relevant a label is to a particular geographic region. Forexample, businesses “ABC Inc.”, “B2B Corp.”, and “B2C P.C.” can all belocated in the same building in a particular geographic region. Eachbusiness can have a respective label that describes the business and arespective popularity score associated with the label. For example,labels for the businesses “ABC Inc.”, “B2B Corp.”, and “B2C P.C.” can berespectively scored 0.7, 0.4, and 0.8. When generating an interactivegeographic map for the particular geographic region, the client device1102 can evaluate the respective scores associated with the labels toselect labels for display in the interactive geographic map. In theexample above, the client device 1102 selects the label “B2C P.C.” fordisplay at the building's location in the interactive geographic map,since that label has the highest popularity score.

After receiving the map data 1122 from the map server 1108, and throughthe network 1104, a software application, e.g., web browser or a mapapplication 1124, running on the client device 1102 renders aninteractive geographic map for the requested geographic region using themap data 1122. For example, a mapping engine 1126 in the map application1124 can position map tiles, in a collection of map tiles describing therequested geographic region, for display on a display screen of theclient device 1102. Additionally, the mapping engine 1126 can evaluatethe map data 1122 to select labels to be displayed in the interactivegeographic map. As described above, the mapping engine 1126 can selectlabels for display based on the respective popularity scores for thelabels.

In some embodiments, the web server 1106, map server 1108, and similarcomponents, can be considered to be part of the data plane 1110. Thehandling of all requests and responses, as well as the delivery ofcontent between the client device 1102 and the map server 1108, can behandled by the web server 1106. The web server 1106 and map server 1108are merely example components. However, more or fewer components can beused as structured code can be executed on any appropriate device orhost machine as discussed elsewhere herein.

The data plane 1110 includes one or more resources, servers, hosts,instances, routers, switches, data stores, other similar components, ora combination thereof. The resources of the data plane 1110 are notlimited to storing and providing access to data. Indeed, there may beseveral map servers, layers, or other elements, processes, orcomponents, which may be chained or otherwise configured, and which caninteract to perform tasks including, for example, obtaining data from anappropriate data store. In some embodiments, the term “data store”refers to any device or combination of devices capable of storing,accessing, and retrieving data, which may include any combination andnumber of data servers, databases, data storage devices, and datastorage media, in any standard, distributed, or clustered environment.

The data stores of the data plane 1110 can include several separate datatables, databases, or other data storage mechanisms and media forstoring data relating to a particular aspect. For example, the dataplane 1110 illustrated includes mechanisms for storing geographic mapdata 1112 and user information 1116, which can be used to serve content.The data plane 1110 is also shown to include a mechanism for storing logdata 1114, which can be used for purposes such as reporting andanalysis. The data plane 1110 is operable, through logic associatedtherewith, to receive instructions from the map server 1108 and toobtain, update, or otherwise process data, instructions, or other suchinformation in response thereto, as described above.

Each server typically includes an operating system that providesexecutable program instructions for the general administration andoperation of that server, and typically will include a computer-readablemedium storing instructions that, when executed by a processor of theserver, enable the server to perform its intended functions. Suitableimplementations for the operating system and general functionality ofthe servers are known or commercially available, and are readilyimplemented by persons having ordinary skill in the art, particularly inlight of the disclosure herein.

The environment in one embodiment is a distributed computing environmentincluding several computer systems and components that areinterconnected through one or more communication links, using one ormore computer networks or direct connections. However, the systemdescribed above can be configured to operate equally well using fewer ora greater number of components than are illustrated in FIG. 11. Thus,the system 1100 in FIG. 11 is provided merely as one example, and doesnot limit the scope of the disclosure.

FIG. 12 illustrates a logical arrangement of a set of general componentsof an example computing device 1200 such as the device 1102 described inreference to FIG. 11. In this example, the device includes a processor1202 for executing instructions that can be stored in a memory device orelement 1204. As would be apparent to one of ordinary skill in the art,the device can include many types of memory, data storage, ornon-transitory computer-readable storage media, such as a first datastorage for program instructions for execution by the processor 1202, aseparate storage for images or data, a removable memory for sharinginformation with other devices, etc. The device typically will includesome type of display element 1206, such as a touch screen or liquidcrystal display (LCD), although devices such as portable media playersmight convey information via other means, such as through audiospeakers. As discussed, the device in many embodiments will include atleast one image capture element 1208 such as a camera or infrared sensorthat is able to image projected images or other objects in the vicinityof the device. Methods for capturing images or video using a cameraelement with a computing device are well known in the art and will notbe discussed herein in detail. It should be understood that imagecapture can be performed using a single image, multiple images, periodicimaging, continuous image capturing, image streaming, etc. Further, adevice can include the ability to start and/or stop image capture, suchas when receiving a command from a user, application, or other device.The example device similarly includes at least one audio capturecomponent 1212, such as a mono or stereo microphone or microphone array,operable to capture audio information from at least one primarydirection. A microphone can be a uni- or omni-directional microphone asknown for such devices.

In some embodiments, the computing device 1200 of FIG. 12 can includeone or more communication elements (not shown), such as a Wi-Fi,Bluetooth, RF, wired, or wireless communication system. The device inmany embodiments can communicate with a network, such as the Internet,and may be able to communicate with other such devices. In someembodiments the device can include at least one additional input deviceable to receive conventional input from a user. This conventional inputcan include, for example, a push button, touch pad, touch screen, wheel,joystick, keyboard, mouse, keypad, or any other such device or elementwhereby a user can input a command to the device. In some embodiments,however, such a device might not include any buttons at all, and mightbe controlled only through a combination of visual and audio commands,such that a user can control the device without having to be in contactwith the device.

The device 1200 also can include at least one orientation or motionsensor 1210. As discussed, such a sensor can include an accelerometer orgyroscope operable to detect an orientation and/or change inorientation, or an electronic or digital compass, which can indicate adirection in which the device is determined to be facing. Themechanism(s) also (or alternatively) can include or comprise a globalpositioning system (GPS) or similar positioning element operable todetermine relative coordinates for a position of the computing device,as well as information about relatively large movements of the device.The device can include other elements as well, such as may enablelocation determinations through triangulation or another such approach.These mechanisms can communicate with the processor 1202, whereby thedevice can perform any of a number of actions described or suggestedherein.

As an example, a computing device can capture and/or track variousinformation for a user over time. This information can include anyappropriate information, such as location, actions (e.g., sending amessage or creating a document), user behavior (e.g., how often a userperforms a task, the amount of time a user spends on a task, the ways inwhich a user navigates through an interface, etc.), user preferences(e.g., how a user likes to receive information), open applications,submitted requests, received calls, and the like. As discussed above,the information can be stored in such a way that the information islinked or otherwise associated whereby a user can access the informationusing any appropriate dimension or group of dimensions.

The various embodiments can be implemented in a wide variety ofoperating environments, which in some cases can include one or more usercomputers, computing devices, or processing devices which can be used tooperate any of a number of applications. User or client devices caninclude any of a number of general purpose personal computers, such asdesktop or laptop computers running a standard operating system, as wellas cellular, wireless, and handheld devices running mobile software andcapable of supporting a number of networking and messaging protocols.Such a system also can include a number of workstations running any of avariety of commercially-available operating systems and other knownapplications for purposes such as development and database management.These devices also can include other electronic devices, such as dummyterminals, thin-clients, gaming systems, and other devices capable ofcommunicating via a network.

Various aspects also can be implemented as part of at least one serviceor Web service, such as may be part of a service-oriented architecture.Services such as Web services can communicate using any appropriate typeof messaging, such as by using messages in extensible markup language(XML) format and exchanged using an appropriate protocol such as SOAP(derived from the “Simple Object Access Protocol”). Processes providedor executed by such services can be written in any appropriate language,such as the Web Services Description Language (WSDL). Using a languagesuch as WSDL allows for functionality such as the automated generationof client-side code in various SOAP frameworks.

Most embodiments utilize at least one network that would be familiar tothose skilled in the art for supporting communications using any of avariety of commercially-available protocols, such as TCP/IP, OSI, FTP,UPnP, NFS, CIFS, and AppleTalk. The network can be, for example, a localarea network, a wide-area network, a virtual private network, theInternet, an intranet, an extranet, a public switched telephone network,an infrared network, a wireless network, and any combination thereof.

In embodiments utilizing a Web server, the Web server can run any of avariety of server or mid-tier applications, including HTTP servers, FTPservers, CGI servers, data servers, Java servers, and business mapservers. The server(s) also may be capable of executing programs orscripts in response requests from user devices, such as by executing oneor more Web applications that may be implemented as one or more scriptsor programs written in any programming language, such as Java®, C, C# orC++, or any scripting language, such as Perl, Python, or TCL, as well ascombinations thereof. The server(s) may also include database servers,including without limitation those commercially available from Oracle®,Microsoft®, Sybase®, and IBM®.

The environment can include a variety of data stores and other memoryand storage media as discussed above. These can reside in a variety oflocations, such as on a storage medium local to (and/or resident in) oneor more of the computers or remote from any or all of the computersacross the network. In a particular set of embodiments, the informationmay reside in a storage-area network (“SAN”) familiar to those skilledin the art. Similarly, any necessary files for performing the functionsattributed to the computers, servers, or other network devices may bestored locally and/or remotely, as appropriate. Where a system includescomputerized devices, each such device can include hardware elementsthat may be electrically coupled via a bus, the elements including, forexample, at least one central processing unit (CPU), at least one inputdevice (e.g., a mouse, keyboard, controller, touch screen, or keypad),and at least one output device (e.g., a display device, printer, orspeaker). Such a system may also include one or more storage devices,such as disk drives, optical storage devices, and solid-state storagedevices such as random access memory (“RAM”) or read-only memory(“ROM”), as well as removable media devices, memory cards, flash cards,etc.

Such devices also can include a computer-readable storage media reader,a communications device (e.g., a modem, a network card (wireless orwired), an infrared communication device, etc.), and working memory asdescribed above. The computer-readable storage media reader can beconnected with, or configured to receive, a computer-readable storagemedium, representing remote, local, fixed, and/or removable storagedevices as well as storage media for temporarily and/or more permanentlycontaining, storing, transmitting, and retrieving computer-readableinformation. The system and various devices also typically will includea number of software applications, modules, services, or other elementslocated within at least one working memory device, including anoperating system and application programs, such as a client applicationor Web browser. It should be appreciated that alternate embodiments mayhave numerous variations from that described above. For example,customized hardware might also be used and/or particular elements mightbe implemented in hardware, software (including portable software, suchas applets), or both. Further, connection to other computing devicessuch as network input/output devices may be employed.

Storage media and computer readable media for containing code, orportions of code, can include any appropriate media known or used in theart, including storage media and communication media, such as but notlimited to volatile and non-volatile, removable and non-removable mediaimplemented in any method or technology for storage and/or transmissionof information such as computer readable instructions, data structures,program modules, or other data, including RAM, ROM, EEPROM, flash memoryor other memory technology, CD-ROM, digital versatile disk (DVD) orother optical storage, magnetic cassettes, magnetic tape, magnetic diskstorage or other magnetic storage devices, or any other medium which canbe used to store the desired information and which can be accessed bythe a system device. Based on the disclosure and teachings providedherein, a person of ordinary skill in the art will appreciate other waysand/or methods to implement the various embodiments.

The specification and drawings are, accordingly, to be regarded in anillustrative rather than a restrictive sense. It will, however, beevident that various modifications and changes may be made thereuntowithout departing from the broader spirit and scope of the invention asset forth in the claims.

What is claimed is:
 1. A computing device, comprising: a display; asensor; one or more processors; and memory storing instructions that,when executed by the one or more processors, cause the computing deviceto perform operations, comprising: rotating a geographic map on thedisplay; in response to rotating the geographic map on the display,rotating on the display a label for a feature of the geographic map;determining a reference direction of the computing device based on anoutput of the sensor; determining, based on the reference direction ofthe computing device, a first threshold angle relative to the computingdevice; determining that an angle of the label relative to the computingdevice crossed the first threshold angle as the label rotated on thedisplay when the label was in a first orientation; flipping anorientation of the label on the display from the first orientation to asecond orientation in response to determining the angle of the label onthe display crossed the first threshold angle; in response to flippingthe orientation of the label from the first orientation to the secondorientation, determining a second threshold angle by adjusting the firstthreshold angle by a predetermined amount in a first direction;determining that the angle of the label relative to the computing devicecrossed the second threshold angle as the label rotated on the displaywhen the label was in the second orientation; and flipping theorientation of the label on the display from the second orientation tothe first orientation in response to determining the angle of the labelon the display crossed the second threshold angle.
 2. The computingdevice of claim 1, wherein the memory stores additional instructionsthat, when executed by the one or more processors, cause the computingdevice to perform further operations comprising: identifying a change inan orientation of the computing device; rotating the geographic map onthe display in response to identifying the change in the orientation ofthe computing device.
 3. The computing device of claim 1, whereindetermining the reference direction of the computing device comprises:processing the output of the sensor to determine a direction that isvertically up; and determining the reference direction based on thedirection that is vertically up.
 4. The computing device of claim 3,wherein the sensor comprises an accelerometer.
 5. The computing deviceof claim 1, wherein determining the reference direction of the computingdevice comprises: using a head tracking technique to determine adirection of a head or eyes of a user; and determining the referencedirection based on the direction of the head or eyes of the user.
 6. Thecomputing device of claim 1, wherein the memory stores additionalinstructions that, when executed by the one or more processors, furthercause the computing device to perform a further operation comprising: inresponse to flipping the orientation of the label from the secondorientation to the first orientation, determining the first thresholdangle by adjusting the second threshold angle by the predeterminedamount in a second direction.
 7. A computer-implemented method fororienting labels in an interactive geographic map presented on a displayof a computing device, the method comprising: receiving, from a mapsearch system and at the computing device, map data that describes ageographic region, the map data including a collection of labels thateach describes a feature that is located in the geographic region, eachlabel being associated with a placement in an interactive geographic mapthat represents the geographic region; rotating the interactivegeographic map on the display; in response to rotating the interactivegeographic map on the display, rotating on the display a first label ofthe collection of labels; determining a reference direction of thecomputing device based on an output of a sensor of the computing device;determining, based on the reference direction of the computing device, afirst threshold angle relative to the computing device; determining thatan angle of the first label relative to the computing device crossed thefirst threshold angle as the first label rotated on the display when thefirst label was in a first orientation; flipping an orientation of thefirst label on the display from the first orientation to a secondorientation in response to determining the angle of the first label onthe display crossed the first threshold angle; in response to flippingthe orientation of the label from the first orientation to the secondorientation, determining a second threshold angle by adjusting the firstthreshold angle by a predetermined amount in a first direction;determining that the angle of the first label relative to the computingdevice crossed the second threshold angle as the first label rotated onthe display when the first label was in the second orientation; andflipping the orientation of the first label on the display from thesecond orientation to the first second orientation in response todetermining the angle of the first label on the display crossed thesecond threshold angle.
 8. The computer-implemented method of claim 7,further comprising: identifying a change in an orientation of thecomputing device; rotating the interactive geographic map on the displayin response identifying the change in the orientation of the computingdevice.
 9. The computer-implemented method of claim 7, whereindetermining the reference direction of the computing device comprises:processing the output of the sensor to determine a direction that isvertically up; and determining the reference direction based on thedirection that is vertically up.
 10. The computer-implemented method ofclaim 9, wherein the sensor comprises an accelerometer, and processingthe output of the sensor comprises processing an output of theaccelerometer to determine the direction that is vertically up.
 11. Thecomputer-implemented method of claim 7, wherein determining thereference direction of the computing device comprises: using a headtracking technique to determine a direction of a head or eyes of a user;and determining the reference direction based on the direction of thehead or eyes of the user.
 12. The computer-implemented method of claim7, further comprising: in response to flipping the orientation of thefirst label from the second orientation to the first orientation,determining the first threshold angle by adjusting the second thresholdangle by the predetermined amount in a second direction.